---
title: Spinner
description: An indicator that can be used to show a loading state.
---

<ComponentPreview name="p-spinner-1" />

## Installation

<CodeTabs>

<TabsList>
  <TabsTab value="cli">CLI</TabsTab>
  <TabsTab value="manual">Manual</TabsTab>
</TabsList>
<TabsPanel value="cli">

```bash
npx shadcn@latest add @coss/spinner
```

</TabsPanel>

<TabsPanel value="manual">

<Steps>

<Step>Copy and paste the following code into your project.</Step>

<ComponentSource name="spinner" title="components/ui/spinner.tsx" />

<Step>Update the import paths to match your project setup.</Step>

</Steps>

</TabsPanel>

</CodeTabs>

## Usage

```tsx
import { Spinner } from "@/components/ui/spinner"
```

```tsx
<Spinner />
```

## Examples

### Input Group

<ComponentPreview name="p-input-12" />

### Button

<ComponentPreview name="p-button-18" />

## API Reference

### Spinner

Use the `Spinner` component to display a loading indicator.

| Prop        | Type     | Default |
| ----------- | -------- | ------- |
| `className` | `string` |         |

```tsx
<Spinner />
```

